import request from '@/utils/request'

// 获取图片数据
export function getSpuImageListApi (spuId) {
  return request({
    url: `/admin/product/spuImageList/${spuId}`,
    method: 'get'
  })
}

// 获取销售属性的数据
export function getSpuSaleAttrListApi (spuId) {
  return request({
    url: `/admin/product/spuSaleAttrList/${spuId}`,
    method: 'get'
  })
}

// 获取平台属性的数据
export function getAttrInfoListApi (category1Id, category2Id, category3Id) {
  return request({
    url: `/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,
    method: 'get'
  })
}

// 添加sku
export function saveSkuInfoApi (skuInfo) {
  return request({
    url: '/admin/product/saveSkuInfo',
    data: skuInfo
  })
}
